//  [10/9/2013 OMEGA] created

#ifndef _DUELGUIECOMMAND_H_
#define _DUELGUIECOMMAND_H_

#include <QUndoCommand>
#include "DuelGUIECommon.h"


class DGUIECommand : public QUndoCommand
{
public:
	DGUIECommand(DGUIEWorkbench* wrkbch, QUndoCommand* parent) : QUndoCommand(parent), mParentWorkbench(wrkbch), mbExecuted(false) {}

	bool		isExecuted() { return mbExecuted; }

	// sub-class must execute this method in their implementation.
	virtual void	redo() { mbExecuted = true; }
	virtual	void	undo() { mbExecuted = false; }


protected:
	DGUIEWorkbench*	mParentWorkbench;
	bool			mbExecuted;
};


#endif